<%@ page contentType="text/html; charset=utf-8" 
%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" 
%><%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" 
%><%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" 
%><%
    System.out.println("*** " + request.getRequestURI());
%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><title>odd closure</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%@ include file="/jsp/common/include.base.jsp" %>
<script type="text/javascript">

function _each() {
	var source = [0, 1, 2, 3, 4, 5];
	var target = [1, 4, 100];
	
	$.each(target, function(i1, t1) { 
	    var match;
	    
	    console.log("t1:" + t1);
	    $.each(source, function(i2, t2) {
	    	console.log("t2:" + t2);
	    	if (t1 == t2) { 
	    		match = t2; 
	    		return false;
	    	}
	    });
	    
	    console.log("match:" + match);
	});
}

function loop() {
}

function run() {
    _each();	
}
	
</script>
</head>
<body>
<button type="button" id="button" onclick="run();">odd closure</button>
</div>
</body>
</html>